import { createApp } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import { createPinia } from 'pinia';
// eslint-disable-next-line import/no-unresolved
import routes from 'virtual:generated-pages';
import App from './App.vue';
import { setupI18n } from './locale';
import './styles/tailwind.css';
import '@/styles/index.scss';
import 'element-plus/dist/index.css';

const app = createApp(App);

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes,
});

// 多语言国际化
app.use(setupI18n);
// 状态管理
app.use(createPinia());
// 路由
app.use(router);
app.mount('#app');
